def reverse_number(input_num):
    yy = 0
    while input_num:
        input_num, y = divmod(input_num, 10)
        yy = yy * 10 + y
    return yy


def palindrome_number(input_num):
    if input_num == reverse_number(input_num):
        return True
    else:
        return False


def reverse_check(input_num):
    if input_num <= 0:
        return False
    x = input_num
    for i in range(5):
        r_n = reverse_number(x)
        is_palindrome = palindrome_number(r_n)
        if i == 0:
            print("第{}次，数字{}".format((i + 1), x), end="")
        else:
            print("第{}次,相加后数字为{}，".format((i + 1), x), end="")
        print("逆序后为：{}，回文检测结果：{}".format(r_n, is_palindrome))
        if is_palindrome:
            print("数字{}，第{}次逆序相加后是回文数，所以是非利克瑞尔数".format(input_num, (i + 1)))
            break
        x += r_n


reverse_check(45678)
